document.addEventListener('DOMContentLoaded', function() {
    function addA() {
        const bLi = document.querySelector('.b')
        const aLi = document.createElement('li')
        aLi.innerText = 'A'
        bLi.parentNode.insertBefore(aLi, bLi)
    }

    function addD() {
        const eLi = document.querySelector('.e')
        const dLi = document.createElement('li')
        dLi.innerText = 'D'
        eLi.parentNode.insertBefore(dLi, eLi)
    }
    const aTrigger = document.querySelector('#aTrigger')

    aTrigger.onclick = function() {
        addA()
        addD()
    }
})